﻿<ResourceDictionary
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
    
    <Style x:Key="ImageStyle" TargetType="{x:Type Image}">
        <Setter Property="StretchDirection" Value="DownOnly"/>
    </Style>

    <Style x:Key="AccountImageStyle" TargetType="{x:Type Image}" BasedOn="{StaticResource ImageStyle}">
        <Setter Property="Source" Value=".\Images\account.png" />
    </Style>

    <Style x:Key="ArrowRefreshImageStyle" TargetType="{x:Type Image}" BasedOn="{StaticResource ImageStyle}">
        <Setter Property="Source" Value=".\Images\arrow_refresh.png"/>
    </Style>

    <Style x:Key="ArrowReplyImageStyle" TargetType="{x:Type Image}" BasedOn="{StaticResource ImageStyle}">
        <Setter Property="Source" Value=".\Images\arrow_reply.png"/>
    </Style>

    <Style x:Key="ArrowReTweetImageStyle" TargetType="{x:Type Image}" BasedOn="{StaticResource ImageStyle}">
        <Setter Property="Source" Value=".\Images\retweet.png"/>
    </Style>

    <Style x:Key="HomeImageStyle" TargetType="{x:Type Image}" BasedOn="{StaticResource ImageStyle}">
        <Setter Property="Source" Value=".\Images\home.png"/>
    </Style>

    <Style x:Key="SettingImageStyle" TargetType="{x:Type Image}" BasedOn="{StaticResource ImageStyle}">
        <Setter Property="Source" Value=".\Images\setting.png"/>
    </Style>

    <Style x:Key="SearchImageStyle" TargetType="{x:Type Image}" BasedOn="{StaticResource ImageStyle}">
        <Setter Property="Source" Value=".\Images\search.png"/>
    </Style>

    <Style x:Key="NewImageStyle" TargetType="{x:Type Image}" BasedOn="{StaticResource ImageStyle}">
        <Setter Property="Source" Value=".\Images\new.png"/>
    </Style>

    <Style x:Key="NetworkImageStyle" TargetType="{x:Type Image}" BasedOn="{StaticResource ImageStyle}">
        <Setter Property="Source" Value=".\Images\network.png"/>
    </Style>

    <Style x:Key="ProtectImageStyle" TargetType="{x:Type Image}" BasedOn="{StaticResource ImageStyle}">
        <Setter Property="Source" Value=".\Images\protect.png"/>
    </Style>

    <Style x:Key="HeartImageStyle" TargetType="{x:Type Image}" BasedOn="{StaticResource ImageStyle}">
        <Setter Property="Source" Value=".\Images\heart.png"/>
    </Style>

    <Style x:Key="FavoriteImageStyle" TargetType="{x:Type Image}" BasedOn="{StaticResource ImageStyle}">
        <Setter Property="Source" Value=".\Images\star_empty.png"/>
        <Style.Triggers>
            <DataTrigger Binding="{Binding Path=Favorited}" Value="True">
                <Setter Property="Source" Value=".\Images\star.png"/>
            </DataTrigger>
        </Style.Triggers>
    </Style>

    <Style x:Key="CrossImageStyle" TargetType="{x:Type Image}" BasedOn="{StaticResource ImageStyle}">
        <Setter Property="Source" Value=".\Images\cross.png"/>
    </Style>

    <Style x:Key="PopupImageStyle" TargetType="{x:Type Image}" BasedOn="{StaticResource ImageStyle}">
        <Setter Property="Source" Value=".\Images\popup.png"/>
    </Style>

    <Style x:Key="DesignImageStyle" TargetType="{x:Type Image}" BasedOn="{StaticResource ImageStyle}">
        <Setter Property="Source" Value=".\Images\design.png"/>
    </Style>

    <Style x:Key="KeyboardImageStyle" TargetType="{x:Type Image}" BasedOn="{StaticResource ImageStyle}">
        <Setter Property="Source" Value=".\Images\keyboard.png"/>
    </Style>

    <Style x:Key="LogImageStyle" TargetType="{x:Type Image}" BasedOn="{StaticResource ImageStyle}">
        <Setter Property="Source" Value=".\Images\log.png"/>
    </Style>

    <Style x:Key="AddInImageStyle" TargetType="{x:Type Image}" BasedOn="{StaticResource ImageStyle}">
        <Setter Property="Source" Value=".\Images\addin.png"/>
    </Style>

    <Style x:Key="SoundImageStyle" TargetType="{x:Type Image}" BasedOn="{StaticResource ImageStyle}">
        <Setter Property="Source" Value=".\Images\sound.png"/>
    </Style>

    <Style x:Key="KeywordImageStyle" TargetType="{x:Type Image}" BasedOn="{StaticResource ImageStyle}">
        <Setter Property="Source" Value=".\Images\keyword.png"/>
    </Style>

    <SolidColorBrush x:Key="WindowBrushKey" Color="#FF2D2D2D"/>
    <SolidColorBrush x:Key="HeaderBrushKey" Color="#FF4F4F4F"/>
    <SolidColorBrush x:Key="HighlightBrushKey" Color="#FF8E8E8E"/>
    <SolidColorBrush x:Key="HotTrackBrushKey" Color="#FFAFAFAF"/>
    <SolidColorBrush x:Key="GrayTextBrushKey" Color="#FF9E9E9E"/>

    <Style x:Key="BaseButtonStyle" TargetType="{x:Type ButtonBase}">
        <Setter Property="OverridesDefaultStyle" Value="True"/>
        <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
        <Setter Property="Background" Value="{StaticResource WindowBrushKey}"/>
        <Setter Property="BorderThickness" Value="0"/>
        <Setter Property="Foreground" Value="White"/>
        <Setter Property="HorizontalContentAlignment" Value="Center"/>
        <Setter Property="VerticalContentAlignment" Value="Center"/>
        <Setter Property="Padding" Value="2"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type ButtonBase}">
                    <Border Name="Bd" CornerRadius="4" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" SnapsToDevicePixels="true">
                        <ContentPresenter Margin="{TemplateBinding Padding}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsMouseOver" Value="True">
                            <Setter TargetName="Bd" Property="Background" Value="{StaticResource HotTrackBrushKey}"/>
                        </Trigger>
                        <Trigger Property="IsPressed" Value="True">
                            <Setter TargetName="Bd" Property="Background" Value="{StaticResource HighlightBrushKey}"/>
                        </Trigger>
                        <Trigger Property="IsEnabled" Value="False">
                            <Setter Property="Foreground" Value="{StaticResource GrayTextBrushKey}"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="{x:Type Button}" TargetType="{x:Type Button}" BasedOn="{StaticResource BaseButtonStyle}"/>
    
    <Style x:Key="{x:Type CheckBox}" TargetType="{x:Type CheckBox}">
        <Setter Property="OverridesDefaultStyle" Value="True"/>
        <Setter Property="Foreground" Value="White"/>
        <Setter Property="Background" Value="{StaticResource HeaderBrushKey}"/>
        <Setter Property="BorderBrush" Value="{StaticResource HighlightBrushKey}"/>
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type CheckBox}">
                    <BulletDecorator Background="Transparent" SnapsToDevicePixels="true">
                        <BulletDecorator.Bullet>
                            <Border x:Name="Bd" Width="12" Height="12" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
                                <Path x:Name="CheckMark" SnapsToDevicePixels="False" Stroke="{TemplateBinding Foreground}" StrokeThickness="2" Data="M0,4L4,8 8,0" HorizontalAlignment="Center" VerticalAlignment="Center" />
                            </Border>
                        </BulletDecorator.Bullet>
                        <ContentPresenter Margin="{TemplateBinding Padding}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
                    </BulletDecorator>
                    <ControlTemplate.Triggers>
                        <Trigger Property="HasContent" Value="true">
                            <Setter Property="Padding" Value="4,0,0,0"/>
                        </Trigger>
                        <Trigger Property="IsChecked" Value="False">
                            <Setter TargetName="CheckMark" Property="Visibility" Value="Collapsed"/>
                        </Trigger>
                        <Trigger Property="IsChecked" Value="{x:Null}">
                            <Setter TargetName="CheckMark" Property="Data" Value="M2,2L6,2 6,6 2,6" />
                        </Trigger>
                        <Trigger Property="IsMouseOver" Value="True">
                            <Setter TargetName="Bd" Property="BorderBrush" Value="White" />
                        </Trigger>
                        <Trigger Property="IsEnabled" Value="false">
                            <Setter Property="Foreground" Value="{StaticResource GrayTextBrushKey}"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    
    <Style x:Key="{x:Type Hyperlink}" TargetType="{x:Type Hyperlink}">
        <Setter Property="TextDecorations" Value="{x:Null}"/>
        <Setter Property="Foreground" Value="White"/>
        <Style.Triggers>
            <Trigger Property="IsMouseOver" Value="True">
                <Setter Property="TextDecorations" Value="Underline"/>
            </Trigger>
        </Style.Triggers>
    </Style>

    <Style x:Key="{x:Type PasswordBox}" TargetType="{x:Type PasswordBox}">
        <Setter Property="OverridesDefaultStyle" Value="True"/>
        <Setter Property="Background" Value="{StaticResource WindowBrushKey}"/>
        <Setter Property="FontFamily" Value="{DynamicResource {x:Static SystemFonts.MessageFontFamilyKey}}"/>
        <Setter Property="PasswordChar" Value="●"/>
        <Setter Property="Foreground" Value="White"/>
        <Setter Property="KeyboardNavigation.TabNavigation" Value="None"/>
        <Setter Property="BorderThickness" Value="0"/>
        <Setter Property="HorizontalContentAlignment" Value="Left"/>
        <Setter Property="Padding" Value="1"/>
        <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
        <Setter Property="AllowDrop" Value="true"/>
        <Setter Property="ContextMenu" Value="{StaticResource TextBoxContextMenu}"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type PasswordBox}">
                    <Border x:Name="Bd" CornerRadius="4" BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{TemplateBinding BorderBrush}" Background="{TemplateBinding Background}" SnapsToDevicePixels="true">
                        <ScrollViewer x:Name="PART_ContentHost" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsEnabled" Value="false">
                            <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="ScrollBarButton" TargetType="{x:Type RepeatButton}">
        <Setter Property="OverridesDefaultStyle" Value="True"/>
        <Setter Property="Focusable" Value="false"/>
        <Setter Property="IsTabStop" Value="false"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type RepeatButton}">
                    <Border SnapsToDevicePixels="True" Background="{TemplateBinding Background}">
                        <Path x:Name="Bg" Fill="{StaticResource HighlightBrushKey}" Data="{TemplateBinding Content}" HorizontalAlignment="Center" VerticalAlignment="Center" StrokeThickness="0"/>
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsMouseOver" Value="True">
                            <Setter TargetName="Bg" Property="Fill" Value="{StaticResource HotTrackBrushKey}"/>
                        </Trigger>
                        <Trigger Property="IsPressed" Value="True">
                            <Setter TargetName="Bg" Property="Fill" Value="{StaticResource WindowBrushKey}"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    
    <Style x:Key="ScrollBarThumb" TargetType="{x:Type Thumb}">
        <Setter Property="OverridesDefaultStyle" Value="True"/>
        <Setter Property="IsTabStop" Value="false"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type Thumb}">
                    <Rectangle x:Name="Bg" SnapsToDevicePixels="true" RadiusX="4" RadiusY="4" Margin="{TemplateBinding Padding}" Fill="{StaticResource HighlightBrushKey}"/>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsMouseOver" Value="True">
                            <Setter TargetName="Bg" Property="Fill" Value="{StaticResource HotTrackBrushKey}"/>
                        </Trigger>
                        <Trigger Property="IsDragging" Value="True">
                            <Setter TargetName="Bg" Property="Fill" Value="{StaticResource WindowBrushKey}"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    
    <Style x:Key="ScrollBarPageButton" TargetType="{x:Type RepeatButton}">
        <Setter Property="OverridesDefaultStyle" Value="True"/>
        <Setter Property="Background" Value="Transparent"/>
        <Setter Property="Focusable" Value="false"/>
        <Setter Property="IsTabStop" Value="false"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type RepeatButton}">
                    <Rectangle Fill="{TemplateBinding Background}" Width="{TemplateBinding Width}" Height="{TemplateBinding Height}"/>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    
    <Style x:Key="{x:Type ScrollBar}" TargetType="{x:Type ScrollBar}">
        <Setter Property="OverridesDefaultStyle" Value="True"/>
        <Setter Property="Background" Value="{StaticResource HeaderBrushKey}"/>
        <Setter Property="Stylus.IsPressAndHoldEnabled" Value="false"/>
        <Setter Property="Stylus.IsFlicksEnabled" Value="false"/>
        <Setter Property="Foreground" Value="White"/>
        <Setter Property="Width" Value="{DynamicResource {x:Static SystemParameters.VerticalScrollBarWidthKey}}"/>
        <Setter Property="MinWidth" Value="{DynamicResource {x:Static SystemParameters.VerticalScrollBarWidthKey}}"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type ScrollBar}">
                    <Border Name="Bg" CornerRadius="4" Background="{TemplateBinding Background}" SnapsToDevicePixels="true">
                        <Grid>
                            <Grid.RowDefinitions>
                                <RowDefinition MaxHeight="{DynamicResource {x:Static SystemParameters.VerticalScrollBarButtonHeightKey}}"/>
                                <RowDefinition Height="0.00001*"/>
                                <RowDefinition MaxHeight="{DynamicResource {x:Static SystemParameters.VerticalScrollBarButtonHeightKey}}"/>
                            </Grid.RowDefinitions>
                            <RepeatButton Style="{StaticResource ScrollBarButton}" IsEnabled="{TemplateBinding IsMouseOver}" Command="{x:Static ScrollBar.LineUpCommand}">
                                <Geometry>M0,8L4,0 8,8z</Geometry>
                            </RepeatButton>
                            <Track Grid.Row="1" Name="PART_Track" IsEnabled="{TemplateBinding IsMouseOver}" IsDirectionReversed="true">
                                <Track.DecreaseRepeatButton>
                                    <RepeatButton Style="{StaticResource ScrollBarPageButton}" Command="{x:Static ScrollBar.PageUpCommand}"/>
                                </Track.DecreaseRepeatButton>
                                <Track.IncreaseRepeatButton>
                                    <RepeatButton Style="{StaticResource ScrollBarPageButton}" Command="{x:Static ScrollBar.PageDownCommand}"/>
                                </Track.IncreaseRepeatButton>
                                <Track.Thumb>
                                    <Thumb Padding="4.5,0" Style="{StaticResource ScrollBarThumb}"/>
                                </Track.Thumb>
                            </Track>
                            <RepeatButton Style="{StaticResource ScrollBarButton}" Grid.Row="2" IsEnabled="{TemplateBinding IsMouseOver}" Command="{x:Static ScrollBar.LineDownCommand}">
                                <Geometry>M0,0L4,8 8,0z</Geometry>
                            </RepeatButton>
                        </Grid>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Style.Triggers>
            <Trigger Property="Orientation" Value="Horizontal">
                <Setter Property="Width" Value="Auto"/>
                <Setter Property="MinWidth" Value="0"/>
                <Setter Property="Height" Value="{DynamicResource {x:Static SystemParameters.HorizontalScrollBarHeightKey}}"/>
                <Setter Property="MinHeight" Value="{DynamicResource {x:Static SystemParameters.HorizontalScrollBarHeightKey}}"/>
                <Setter Property="Background" Value="{StaticResource HeaderBrushKey}"/>
                <Setter Property="Template">
                    <Setter.Value>
                        <ControlTemplate TargetType="{x:Type ScrollBar}">
                            <Border Name="Bg" CornerRadius="4" Background="{TemplateBinding Background}" SnapsToDevicePixels="true">
                                <Grid>
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition MaxWidth="{DynamicResource {x:Static SystemParameters.HorizontalScrollBarButtonWidthKey}}"/>
                                        <ColumnDefinition Width="0.00001*"/>
                                        <ColumnDefinition MaxWidth="{DynamicResource {x:Static SystemParameters.HorizontalScrollBarButtonWidthKey}}"/>
                                    </Grid.ColumnDefinitions>
                                    <RepeatButton Style="{StaticResource ScrollBarButton}" IsEnabled="{TemplateBinding IsMouseOver}" Command="{x:Static ScrollBar.LineLeftCommand}"/>
                                    <Track Grid.Column="1" Name="PART_Track" IsEnabled="{TemplateBinding IsMouseOver}">
                                        <Track.DecreaseRepeatButton>
                                            <RepeatButton Style="{StaticResource ScrollBarPageButton}" Command="{x:Static ScrollBar.PageLeftCommand}"/>
                                        </Track.DecreaseRepeatButton>
                                        <Track.IncreaseRepeatButton>
                                            <RepeatButton Style="{StaticResource ScrollBarPageButton}" Command="{x:Static ScrollBar.PageRightCommand}"/>
                                        </Track.IncreaseRepeatButton>
                                        <Track.Thumb>
                                            <Thumb Padding="0,4.5" Style="{StaticResource ScrollBarThumb}"/>
                                        </Track.Thumb>
                                    </Track>
                                    <RepeatButton Style="{StaticResource ScrollBarButton}" Grid.Column="2" IsEnabled="{TemplateBinding IsMouseOver}" Command="{x:Static ScrollBar.LineRightCommand}"/>
                                </Grid>
                            </Border>
                        </ControlTemplate>
                    </Setter.Value>
                </Setter>
            </Trigger>
        </Style.Triggers>
    </Style>
    
    <Style x:Key="{x:Type StatusBar}" TargetType="{x:Type StatusBar}">
        <Setter Property="Background" Value="{StaticResource WindowBrushKey}"/>
        <Setter Property="Foreground" Value="White"/>
        <Setter Property="FontFamily" Value="{DynamicResource {x:Static SystemFonts.StatusFontFamilyKey}}"/>
        <Setter Property="FontSize" Value="{DynamicResource {x:Static SystemFonts.StatusFontSizeKey}}"/>
        <Setter Property="FontStyle" Value="{DynamicResource {x:Static SystemFonts.StatusFontStyleKey}}"/>
        <Setter Property="FontWeight" Value="{DynamicResource {x:Static SystemFonts.StatusFontWeightKey}}"/>
    </Style>

    <Style x:Key="{x:Type TabControl}" TargetType="{x:Type TabControl}">
        <Setter Property="OverridesDefaultStyle" Value="True"/>
        <Setter Property="Foreground" Value="White"/>
        <Setter Property="Padding" Value="4,4,4,4"/>
        <Setter Property="BorderThickness" Value="0"/>
        <Setter Property="Background" Value="{StaticResource WindowBrushKey}"/>
        <Setter Property="HorizontalContentAlignment" Value="Center"/>
        <Setter Property="VerticalContentAlignment" Value="Center"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type TabControl}">
                    <Grid KeyboardNavigation.TabNavigation="Local" SnapsToDevicePixels="true" ClipToBounds="true">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition x:Name="ColumnDefinition0"/>
                            <ColumnDefinition x:Name="ColumnDefinition1" Width="0"/>
                        </Grid.ColumnDefinitions>
                        <Grid.RowDefinitions>
                            <RowDefinition x:Name="RowDefinition0" Height="Auto"/>
                            <RowDefinition x:Name="RowDefinition1" Height="*"/>
                        </Grid.RowDefinitions>
                        <TabPanel x:Name="HeaderPanel" Panel.ZIndex="1" KeyboardNavigation.TabIndex="1" Grid.Column="0" Grid.Row="0" Margin="2,2,2,0" IsItemsHost="true" HorizontalAlignment="Center"/>
                        <Border x:Name="ContentPanel" Background="{TemplateBinding Background}" BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{TemplateBinding BorderBrush}" KeyboardNavigation.TabNavigation="Local" KeyboardNavigation.DirectionalNavigation="Contained" KeyboardNavigation.TabIndex="2" Grid.Column="0" Grid.Row="1">
                            <ContentPresenter x:Name="PART_SelectedContentHost" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" Margin="{TemplateBinding Padding}" ContentSource="SelectedContent"/>
                        </Border>
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsEnabled" Value="false">
                            <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="{x:Type TabItem}" TargetType="{x:Type TabItem}">
        <Setter Property="OverridesDefaultStyle" Value="True"/>
        <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
        <Setter Property="Foreground" Value="White"/>
        <Setter Property="Padding" Value="6,1,6,1"/>
        <Setter Property="Background" Value="{StaticResource HeaderBrushKey}"/>
        <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
        <Setter Property="VerticalContentAlignment" Value="Stretch"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type TabItem}">
                    <Grid SnapsToDevicePixels="true" Margin="1,0,1,2">
                        <Border Name="Bd" Padding="{TemplateBinding Padding}" Background="{TemplateBinding Background}" BorderThickness="0" CornerRadius="4">
                            <ContentPresenter Name="Content" ContentSource="Header" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" HorizontalAlignment="{Binding Path=HorizontalContentAlignment,RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}" VerticalAlignment="{Binding Path=VerticalContentAlignment,RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}" RecognizesAccessKey="True"/>
                        </Border>
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsSelected" Value="true">
                            <Setter Property="Panel.ZIndex" Value="1"/>
                            <Setter TargetName="Bd" Property="Background" Value="{StaticResource HighlightBrushKey}"/>
                        </Trigger>
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="IsSelected" Value="false"/>
                                <Condition Property="IsMouseOver" Value="true"/>
                            </MultiTrigger.Conditions>
                            <Setter TargetName="Bd" Property="Background" Value="{StaticResource HotTrackBrushKey}"/>
                        </MultiTrigger>
                        <Trigger Property="IsEnabled" Value="false">
                            <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    
    <Style x:Key="{x:Type TextBox}" TargetType="{x:Type TextBox}">
        <Setter Property="OverridesDefaultStyle" Value="True"/>
        <Setter Property="Foreground" Value="White"/>
        <Setter Property="Background" Value="{StaticResource WindowBrushKey}"/>
        <Setter Property="BorderThickness" Value="0"/>
        <Setter Property="Padding" Value="1"/>
        <Setter Property="AllowDrop" Value="true"/>
        <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
        <Setter Property="ContextMenu" Value="{StaticResource TextBoxContextMenu}"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type TextBoxBase}">
                    <Border x:Name="Bd" CornerRadius="4" BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{TemplateBinding BorderBrush}" Background="{TemplateBinding Background}" SnapsToDevicePixels="true">
                        <ScrollViewer x:Name="PART_ContentHost" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsEnabled" Value="false">
                            <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    
    <Style x:Key="MainWindowStyle" TargetType="{x:Type Window}">
        <Setter Property="Background" Value="{StaticResource WindowBrushKey}"/>
        <Setter Property="Foreground" Value="White"/>
    </Style>
    
    <Style x:Key="TweetTextBoxStyle" TargetType="{x:Type TextBox}" BasedOn="{StaticResource {x:Type TextBox}}">
        <Setter Property="Background" Value="{StaticResource HeaderBrushKey}"/>
        <Setter Property="Foreground" Value="White"/>
    </Style>

    <Style x:Key="UpdateButtonStyle" TargetType="{x:Type Button}" BasedOn="{StaticResource {x:Type Button}}">
        <Setter Property="Background" Value="{StaticResource HeaderBrushKey}"/>
        <Setter Property="Foreground" Value="White"/>
        <Setter Property="FontWeight" Value="Bold"/>
    </Style>

    <Style x:Key="TimelineTabControlStyle" TargetType="{x:Type TabControl}" BasedOn="{StaticResource {x:Type TabControl}}">
        <Setter Property="Padding" Value="0"/>
        <Setter Property="BorderThickness" Value="0"/>
    </Style>

    <Style x:Key="TimelineTabItemStyle" TargetType="{x:Type TabItem}" BasedOn="{StaticResource {x:Type TabItem}}">
        <Setter Property="MinWidth" Value="80"/>
        <Setter Property="Padding" Value="0,1,0,1"/>
    </Style>
    
    <Style x:Key="TimelineListBoxStyle" TargetType="{x:Type ListBox}">
        <Setter Property="Background" Value="{StaticResource WindowBrushKey}"/>
        <Setter Property="BorderThickness" Value="0"/>
        <Setter Property="Foreground" Value="White"/>
        <Setter Property="Margin" Value="2,0,2,0"/>
        <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
        <Setter Property="Grid.IsSharedSizeScope" Value="True"/>
        <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Disabled"/>
        <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Visible"/>
        <Setter Property="ScrollViewer.CanContentScroll" Value="true"/>
        <Setter Property="VerticalContentAlignment" Value="Center"/>
        <!--<Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type ListBox}">
                    <Border Name="Bd" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" SnapsToDevicePixels="true" Padding="1">
                        <ScrollViewer Padding="{TemplateBinding Padding}" Focusable="false">
                            <ItemsPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
                        </ScrollViewer>
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsEnabled" Value="false">
                            <Setter TargetName="Bd" Property="Background" Value="{DynamicResource {x:Static SystemColors.ControlBrushKey}}"/>
                        </Trigger>
                        <Trigger Property="IsGrouping" Value="true">
                            <Setter Property="ScrollViewer.CanContentScroll" Value="false"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>-->
    </Style>

    <Style x:Key="TimelineListBoxItemStyle" TargetType="{x:Type ListBoxItem}">
        <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
        <Setter Property="Background" Value="{StaticResource HeaderBrushKey}"/>
        <Setter Property="Foreground" Value="{StaticResource HotTrackBrushKey}"/>
        <Setter Property="HorizontalContentAlignment" Value="{Binding Path=HorizontalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}"/>
        <Setter Property="VerticalContentAlignment" Value="{Binding Path=VerticalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}"/>
        <Setter Property="Padding" Value="2,0,0,0"/>
        <Setter Property="Margin" Value="0,0,2,2"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type ListBoxItem}">
                    <Border Name="Bd" CornerRadius="4" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Padding="{TemplateBinding Padding}" SnapsToDevicePixels="true">
                        <ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsSelected" Value="true">
                            <Setter TargetName="Bd" Property="Background" Value="{StaticResource HighlightBrushKey}"/>
                            <Setter Property="Foreground" Value="{StaticResource WindowBrushKey}"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="TimelineStatusListBoxItemStyle" TargetType="{x:Type ListBoxItem}" BasedOn="{StaticResource TimelineListBoxItemStyle}">
        <Setter Property="ContextMenu" Value="{StaticResource StatusContextMenu}"/>
    </Style>

    <Style x:Key="TimelineMessageListBoxItemStyle" TargetType="{x:Type ListBoxItem}" BasedOn="{StaticResource TimelineListBoxItemStyle}">
        <Setter Property="ContextMenu" Value="{StaticResource MessageContextMenu}"/>
    </Style>
    
    <Style x:Key="SettingDialogStyle" TargetType="{x:Type Window}"/>

    <Style x:Key="CategoryListBoxStyle" TargetType="{x:Type ListBox}">
        <Setter Property="VerticalContentAlignment" Value="Center"/>
    </Style>

    <Style x:Key="CategoryListBoxItemStyle" TargetType="{x:Type ListBoxItem}"/>

        <Style x:Key="PopupWindowStyle" TargetType="{x:Type Window}">
        <Setter Property="Background" Value="{StaticResource WindowBrushKey}"/>
        <Setter Property="Foreground" Value="White"/>
        <Setter Property="WindowStyle" Value="None"/>
        <Setter Property="BorderThickness" Value="0"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type Window}">
                    <Grid Background="{TemplateBinding Background}">
                        <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="*"/>
                        </Grid.RowDefinitions>
                        <Border Grid.Row="0" Background="#FF3CA9CD" BorderBrush="Gray" BorderThickness="1,1,1,0">
                            <Grid>
                                <TextBlock Margin="5,2,0,2" HorizontalAlignment="Left" VerticalAlignment="Center"
                                           FontWeight="Bold" Foreground="White" Text="{TemplateBinding Title}"/>
                                <Button Grid.Row="0" Margin="0,0,3,0" VerticalAlignment="Center" HorizontalAlignment="Right"
                                        Command="ApplicationCommands.Close" Style="{StaticResource ImageButtonStyle}">
                                    <Image Width="14" Height="14" Style="{StaticResource CrossImageStyle}"/>
                                </Button>
                            </Grid>
                        </Border>
                        <AdornerDecorator Grid.Row="1">
                            <ContentPresenter/>
                        </AdornerDecorator>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="PopupListBoxStyle" TargetType="{x:Type ListBox}" BasedOn="{StaticResource TimelineListBoxStyle}">
        <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto"/>
    </Style>

    <Style x:Key="PopupListBoxItemStyle" TargetType="{x:Type ListBoxItem}">
        <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
        <Setter Property="Background" Value="{StaticResource HeaderBrushKey}"/>
        <Setter Property="Foreground" Value="{StaticResource HotTrackBrushKey}"/>
        <Setter Property="HorizontalContentAlignment" Value="{Binding Path=HorizontalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}"/>
        <Setter Property="VerticalContentAlignment" Value="{Binding Path=VerticalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}"/>
        <Setter Property="Padding" Value="2,0,0,0"/>
        <Setter Property="Margin" Value="0,0,2,2"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type ListBoxItem}">
                    <Border Name="Bd" CornerRadius="4" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Padding="{TemplateBinding Padding}" SnapsToDevicePixels="true">
                        <ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

</ResourceDictionary>